package bean;

import java.io.Serializable;
import java.util.Objects;

/**
 * 管理员账号密码类
 */
public class Admin implements Serializable {
    private static final long serialVersionUID=1L;
    private String id;
    private String name;
    private String username;
    private String password;

    public static  String myName;
    public static  String myPassword;


    @Override
    public String toString() {
        return "Admin{" +
                "sno='" + id + '\'' +
                ", name='" + name + '\'' +
                ", username='" + username + '\'' +
                ", password=" + password +
                '}';
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        Admin admin = (Admin) o;
        return password == admin.password && Objects.equals(id, admin.id) && Objects.equals(name, admin.name) && Objects.equals(username, admin.username);

    }

    @Override
    public int hashCode() {
        return Objects.hash(id, name, username, password);
    }

    public Admin() {
        String s="";
    }

    public Admin(String id, String name, String username, String  password) {
        this.id = id;
        this.name = name;
        this.username = username;
        this.password = password;
    }

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }
}
